package com.tubruk.todo;

import java.util.ArrayList;
import java.util.Date;

public class TaskContent {
	private String title;
	private String note;
	private int priority;
	private Date dueDate;
	private Date createdDate;
	private Date modifiedDate;
	private int id;
	private int parentId;
	private int done;
	private ArrayList<TaskContent> child;
	private boolean isExpanded;

	public final static int PRIORITY_NONE = -1;
	public final static int PRIORITY_LOW = 0;
	public final static int PRIORITY_MEDIUM = 1;
	public final static int PRIORITY_HIGH = 2;

	public final static int DONE_NO = 0;
	public final static int DONE_YES = 1;

	public TaskContent() {
		isExpanded = false;
		parentId = -1;
		priority = TaskContent.PRIORITY_NONE;
	}
	

	public int getDone() {
		return done;
	}

	public void setDone(int done) {
		this.done = done;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public Date getDueDate() {
		return dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Date getModifiedDate() {
		return modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate) {
		this.modifiedDate = modifiedDate;
	}

	public void addChild(TaskContent subTask) {
		if (this.child == null) {
			this.child = new ArrayList<TaskContent>();
		}
		this.child.add(subTask);
	}
	
	public void setChild(ArrayList<TaskContent> child) {
		this.child = child;
	}

	public ArrayList<TaskContent> getChild() {
		return this.child;
	}
	
	public boolean isExpanded() {
		return this.isExpanded;
	}
	
	public void setExpanded(boolean isExpanded) {
		this.isExpanded = isExpanded;
	}
}
